<?php

namespace App\Console\Commands;

use App\App\Services\PrizeStockService;
use Illuminate\Console\Command;

class PrizeRecycle extends Command
{

    protected $prizeStockService;
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'prize:recycle';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '活动中剩余的奖品回收';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct(PrizeStockService $prizeStockService)
    {
        $this->prizeStockService = $prizeStockService;
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        echo '--start--'. PHP_EOL;
        $this->prizeStockService->stockRecycle();
        echo '--end--'. PHP_EOL;
    }
}
